package com.meridian.commerce.model;

import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(finders = { "findUserAccountAddressesByUserAccount" })
public class UserAccountAddress {

    @NotNull
    @ManyToOne
    @JoinColumn(name = "USER_ACCOUNT", referencedColumnName = "ID")
    private UserAccount userAccount;

    @NotNull
    @Size(max = 75)
    private String fullName;

    @NotNull
    @Size(max = 75)
    private String addressLine1;

    @Size(max = 75)
    private String addressLine2;

    @NotNull
    @Size(max = 75)
    private String city;

    @NotNull
    @Size(max = 2)
    private String state;

    @NotNull
    @Size(max = 10)
    private String zipCode;

    @NotNull
    @Size(max = 75)
    private String country;

    @NotNull
    @Size(min = 12, max = 12)
    private String phoneNumber;

    private boolean defaultAddress;
}
